local js_zhaohan = fk.CreateSkill {
  name = "js__zhaohan",
  tags={Skill.Compulsory}
}

js_zhaohan:addEffect(fk.EventPhaseStart, {
  mute = true,
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(self) and player.phase == Player.Start and
      ((player:getMark(self.name) == 0 and player:isWounded()) or player:getMark(self.name) > 0)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    if player:getMark(self.name) == 0 then
      player:broadcastSkillInvoke("zhaohan", 1)
      room:notifySkillInvoked(player, self.name, "support")
      room:recover({
        who = player,
        num = 1,
        recoverBy = player,
        skillName = self.name,
      })
    else
      player:broadcastSkillInvoke("zhaohan", 2)
      room:notifySkillInvoked(player, self.name, "negative")
      room:loseHp(player, 1, self.name)
    end
  end,
})
js_zhaohan:addEffect(fk.AfterDrawPileShuffle, {
  can_refresh = function(self, event, target, player, data)
    return player:hasSkill(self, true)
  end,
  on_refresh = function(self, event, target, player, data)
    player.room:setPlayerMark(player, self.name, 1)
  end,
})
return js_zhaohan